package com.supreme.studyserver.proxy;

import java.util.Objects;

public class OneLevelCoder implements ICoder {

    private String codeContent;

    @Override
    public void writeCode(String code) {
        codeContent = code;
    }

    @Override
    public String readCode() {
        return codeContent;
    }

    @Override
    public boolean reviewCode() {
        System.out.println("reviewCode: " + codeContent);
        return Objects.nonNull(codeContent);
    }

    @Override
    public void buildCode() {
        System.out.println("buildCode: " + codeContent);
    }

    @Override
    public String runCode() {
        System.out.println("runCode: " + codeContent);
        return "CODE RUN SUCCESS";
    }
}
